package main

import (
	"dawncloud/services"
	"dawncloud/transport"
	"net/http"
)

func main() {

	//r := gin.Default()
	// 定义 Transport

	// 定义 EndPoint
	// r := chi.NewRouter()

	// http-swagger 被识别为 木马病毒
	// r.Get("/swagger/*", httpSwagger.Handler(
	// 	httpSwagger.URL("http://localhost:8000/swagger/doc.json"), //The url pointing to API definition
	// ))

	// 定义service
	// http.Handle("/home", homeHandler)
	// http.ListenAndServe("0.0.0.0:8000", nil)

	var service = services.HomeService{}
	var endpoint = services.MakeEndpoint(service)
	var handler = transport.MakeHttphandler(endpoint)

	//r.GET("/home", gin.WrapH(handler))
	http.ListenAndServe("0.0.0.0:8000", handler)

}
